@extends('admin.mainlayout')
@section('js')
    <script>
        window.onload = function(){

            /********快闪重定向*********/
            var message = "{{Session::get('message')}}";
            $(window).ready(function () {
                if (message) {
                    layer.msg(message, {
                        time: 3000,

                    });
                }
            });
            /********快闪重定向*********/
        }
    </script>
@endsection
@section('content')
    <div class="main-wrap">
        <div class="crumb-wrap">
            <div class="crumb-list"><i class="icon-font"></i><a href="#">首页</a><span class="crumb-step">&gt;</span><span class="crumb-name">银行卡管理</span></div>
        </div>
        <div class="result-wrap">
            <form action="{{urlAdmin('Websitebank','postAdd')}}" method="post" id="myform" name="myform" enctype="multipart/form-data" onsubmit="{return CheckForm();}">
                {{csrf_field()}}
                <div class="config-items">
                    <div class="config-title">
                        <h1><i class="icon-font">&#xe00a;</i>银行卡添加</h1>
                    </div>
                    <div class="result-content">
                        <table width="100%" class="insert-tab">
                            <tbody>
                            <tr>
                                <th width="15%"><i class="require-red">*</i>收款人：</th>
                                <td><input id='bank_name' name="bank_name"  type="text"><span id="showBug" style=" margin-left:10px;color:#FF0000"></span></td>
                            </tr>
                            <tr>
                                <th><i class="require-red">*</i>账号：</th>
                                <td><input id="bank_no" name="bank_no" type="text"></td>
                            </tr>
                            <tr>
                                <th><i class="require-red"></i>开户行：</th>
                                <td><input id='bank_adddress' name="bank_adddress" type="text"></td>
                            </tr>
                            <tr>
                                <th></th>
                                <td>
                                    <input type="button" onclick="subform()" value="提交" class="btn btn-primary btn6 mr10">
                                    <input type="button" value="返回" onclick="history.go(-1)" class="btn btn6">
                                </td>
                            </tr>
                            </tbody></table>
                    </div>
                </div>
            </form>
        </div>
    </div>
    <script>
        ckemail = 0;
        /*$('#email').blur(function(){
         var path_Email = "{:U('Member/ajaxCheckEmail')}";
         $.ajax({
         type:"get",
         dataType:"json",
         data:{email:$('#email').val()},
         url:path_Email,
         success:function(d){
         if(d['status']==0){
         $('#showBug').html(d['msg']);
         $('#email').focus();
         return false;
         }else{
         $('#showBug').html(d['msg']);
         return ckemail = 1 ;
         }
         },
         });
         });*/
        function subform(){
            //if(ckemail==1){
            $('#myform').submit();
//	}else{
            //	$('#email').focus();
            //}
        }
    </script>
@endsection
@section('footer')
    <script>
        $(".sub-menu").eq(1).show();
        $(".sub-menu").eq(1).children("li").eq(1).addClass("on");
        function CheckForm(){

            if(document.myform.bank_name.value.length<1){
                layer.msg('收款人不能为空！',{
                    time:2000  //2毫秒
                });
                document.myform.bank_name.focus();
                return false;
            }

            if(document.myform.bank_no.value.length<1){
                layer.msg('账号不能为空！',{
                    time:2000  //2毫秒
                });
                document.myform.bank_no.focus();
                return false;
            }

            if(document.myform.bank_adddress.value.length<1){
                layer.msg('开户行不能为空！',{
                    time:2000  //2毫秒
                });
                document.myform.bank_adddress.focus();
                return false;
            }

        }
    </script>
@endsection